package com.ch.engine.biz.manager;

import com.ch.engine.modules.entity.ProjectFile;
import com.ch.engine.modules.service.IProjectFileService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * todo
 *
 * @author wangchunhui
 * @date 2024/9/4 9:40
 */
@Component
@AllArgsConstructor
public class AddressManager {

    private final IProjectFileService projectFileService;

    @Transactional(rollbackFor = Exception.class)
    public void errorInvoker() {
        int i = 1 / 0;
        projectFileService.save(new ProjectFile("TX0001"));
    }
}
